<template>
	<div class="wos-page">
		<div class="main">
			<wos-table :record="onlineUsers"></wos-table>
		</div>
		<div class="console">
			<button @click="refresh">刷新</button>
		</div>
	</div>
</template>

<script>
    export default {
        name: "onlineusers",
	    data:function(){
            return {
                onlineUsers:""
            }
	    },
	    beforeMount() {
            this.getData()
        },
	    methods:{
            getData(){
                let that = this
                this.axios.get('/api/sys/onlineusers.json')
                    .then(function (response) {
                        console.log( 'kalsjdf')
                        if( response.data.code == 200) {
                            that.onlineUsers = response.data.data
	                        console.log( response.data.data )
                        }
                    })
                    .catch(function (error) {
                        that.$message.warn('服务器连接超时，请稍后重试')
                    });
		    },
            refresh(){
                this.getData()
                this.jumpTop()
		    }
	    }
    }
</script>

<style scoped>

</style>
